package com.hualan.service.impl;

/**
 * 作者:烟火味的男孩儿
 * 描述:一条寻找bug的道路
 * 时间:2024/9/6
 */

import com.hualan.domain.Teacher;
import com.hualan.mapper.TeacherMapper;
import com.hualan.service.yuYueInterService;
import com.hualan.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class yuYueServiceImpl implements yuYueInterService {
    //注入mapper层的数据
    @Autowired
    private TeacherMapper mapper;

    @Override
    public R queryTeachers() {
        List<Teacher> list = mapper.queryTeachers();
        if (list == null) {
            return R.fail("查无此数据...");
        }
        return R.success(list);
    }
}
